<?php
/************************************************************************************************
*   This file is a part of JV-LinkExchanger, a link exchange component for Joomla
*   Copyright (C) 2007-2008  Vijaykumar Niranjan 
*	
*   This program is free software; you can redistribute it and/or modify 
*   it under the terms of the GNU General Public License as published by 
*   the Free Software Foundation; either version 2 of the License, or 
*  (at your option) any later version. 
*
*   This program is distributed in the hope that it will be useful, 
*   but WITHOUT ANY WARRANTY; without even the implied warranty of 
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
*   GNU General Public License for more details.  
*
*   You should have received a copy of the GNU General Public License 
*   along with this program; if not, write to the Free Software 
*   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

* 	JV-LinkExchanger - Link Exchange Component for Joomla 1.0.x
* 	@package JV-LinkExchanger
* 	@file version 1.2.5 RELEASE
* 	@author Vijaykumar Niranjan
* 	@link http://www.jv-extensions.com
* 	@copyright (C) 2007-2008 by Vijaykumar Niranjan
* 	@license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*  	This program is distributed with the hope that it will be useful,
*  	but WITHOUT ANY WARRANTY; without even the implied warranty of
*  	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***************************************************************************************************/
// ensure this file is being included by a parent file  
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); 

// ensure user has access to this function 
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') || $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_jvlinx'))) { 
    mosRedirect('index2.php', _NOT_AUTH); 
} 

class TOOLBAR_jvlinx {

	function showTopLevelButtons() 
	{
    	mosMenuBar::startTable();
	    //mosMenuBar::custom('viewlinks', 'publish_f2.png', 'publish_f2.png', 'Links & Banners', false);				
	    //mosMenuBar::custom('viewcat', 'unpublish_f2.png', 'unpublish_f2.png', 'Categories Menu', false);		
	    //mosMenuBar::custom('viewconfig', 'tool_f2.png', 'tool_f2.png', 'Configure Settings', false);	    
	    //mosMenuBar::custom('about', 'publish_f2.png', 'publish_f2.png', _CONTROL_PANEL, false);	
    	mosMenuBar::endTable();
  	}	
	function showConfigButtons() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('saveconfig',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
		mosMenuBar::back(_CONTROL_PANEL, 'index2.php?option=com_jvlinx');
    	mosMenuBar::endTable();
  	}
	function showCategoryButtons() 
	{
		global $JVL;
    	mosMenuBar::startTable();
		mosMenuBar::addNew('newcatform');
		mosMenuBar::deleteList('', 'delcat');
		mosMenuBar::editList('rlc_catlinks_exec', $JVL["B_CFG_177"]);				
		mosMenuBar::editList('cat_snapon', $JVL["B_CFG_175"]);			
		mosMenuBar::editList('cat_snapoff', $JVL["B_CFG_176"]);					
		mosMenuBar::spacer();
		mosMenuBar::divider();		
		mosMenuBar::spacer();
		mosMenuBar::back(_CONTROL_PANEL, 'index2.php?option=com_jvlinx');	
    	mosMenuBar::endTable();
  	}
	function showNewCategoryForm() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('addcat',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
    	mosMenuBar::endTable();
  	}
	function showEditCategoryForm() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('editcat',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
    	mosMenuBar::endTable();
  	}
	function showLinks() 
	{ 
		global $JVL;
    	mosMenuBar::startTable();
		mosMenuBar::addNew('newlinkform');		
		mosMenuBar::deleteList('', 'dellink');
		mosMenuBar::editList('movelinkform', _MENU_MOVE);				
		mosMenuBar::editList('rlc_links_exec', $JVL["B_CFG_177"]);		
		mosMenuBar::editList('fe_link_approve', $JVL["B_CFG_178"]);	
		mosMenuBar::editList('lnk_snapon', $JVL["B_CFG_175"]);			
		mosMenuBar::editList('lnk_snapoff', $JVL["B_CFG_176"]);								
		mosMenuBar::spacer();		
		mosMenuBar::divider();		
		mosMenuBar::spacer();
		mosMenuBar::back(_CONTROL_PANEL, 'index2.php?option=com_jvlinx');	
    	mosMenuBar::endTable();
  	}		
	function showNewLinkForm() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('addlink',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
    	mosMenuBar::endTable();
  	}	
	function showEditLinkForm() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('editlink',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
    	mosMenuBar::endTable();
  	}	
	function showMoveLinkForm() 
	{
    	mosMenuBar::startTable();
	    mosMenuBar::save('movelink',_CMN_SAVE);
    	mosMenuBar::cancel(); // invokes cancel task
    	mosMenuBar::endTable();
  	}	
	function showRLCLinksMenu() 
	{
    	mosMenuBar::startTable();
    	mosMenuBar::back('Back','index2.php?option=com_jvlinx&task=viewlinks'); 
		mosMenuBar::spacer();
		mosMenuBar::divider();		
		mosMenuBar::spacer();
	    mosMenuBar::back(_CONTROL_PANEL, 'index2.php?option=com_jvlinx');	
    	mosMenuBar::endTable();
  	}	
	function showRLCCatLinksMenu() 
	{
    	mosMenuBar::startTable();
    	mosMenuBar::back('Back','index2.php?option=com_jvlinx&task=viewcat'); 
		mosMenuBar::spacer();
		mosMenuBar::divider();					
		mosMenuBar::spacer();
	    mosMenuBar::back(_CONTROL_PANEL, 'index2.php?option=com_jvlinx');	
    	mosMenuBar::endTable();
  	}	
}
?>